var i;
Object.defineProperty(exports, "__esModule", {
  value: true
});
var EventManager = require("AA_EventManager");
var ResKeeper = require("AA_ResKeeper");
var EvenType = require("AA_EvenType");
var _decorator = cc._decorator;
var _ccclass = _decorator.ccclass;
_decorator.property;

var _def_UI_ClickView = function (e) {
  function _creator() {
    var t = null !== e && e.apply(this, arguments) || this;
    t.nowcode = 1;
    return t;
  }
  __extends(_creator, e);
  _creator.prototype.onEnable = function () {
    EventManager.EventMgr.addEventListener(EvenType.EVENT_TYPE.GAME_SHOW_CLICK, this.showClick, this);
    EventManager.EventMgr.addEventListener(EvenType.EVENT_TYPE.GAME_HIDE_CLICK, this.hideClick, this);
    this.node.children[0].active = false;
  };
  _creator.prototype.onDisable = function () {
    EventManager.EventMgr.rmEventListener(EvenType.EVENT_TYPE.GAME_SHOW_CLICK, this.showClick, this);
    EventManager.EventMgr.rmEventListener(EvenType.EVENT_TYPE.GAME_HIDE_CLICK, this.hideClick, this);
  };
  _creator.prototype.showClick = function (e) {
    this.nowcode = e;
    this.node.children[0].active = true;
  };
  _creator.prototype.hideClick = function () {
    this.node.children[0].active = false;
  };
  _creator.prototype.onClickView = function () {
    this.node.children[0].active = false;
    EventManager.EventMgr.dispatchEvent(EvenType.EVENT_TYPE.HIDE_CLICK, this.nowcode);
  };
  return __decorate([_ccclass], _creator);
}(ResKeeper.default);
exports.default = _def_UI_ClickView;